package util

import "github.com/google/uuid"

func ParseMoonID(id string) (moonId string, ok bool) {
	if len(id) > 3 && id[0] == 'M' {
		return id[2:], true
	} else {
		return "", false
	}
}

func ParsePlanetID(id string) (moonId string, ok bool) {
	if len(id) > 3 && id[0] == 'P' {
		return id[2:], true
	} else {
		return "", false
	}
}

func GenMoonID() string {
	return "M-" + uuid.New().String()
}

func GenPlanetID() string {
	return "P-" + uuid.New().String()
}
